<?php $this->pageTitle=Yii::app()->name . ' - Login'; ?>
<div class="content">
    <div class="table">
    <?php $form = $this->beginWidget('CActiveForm'); ?>
        <div class="tr">
            <div class="td"><?= $form->labelEx($model, 'username'); ?></div>
            <div class="td2"><?= $form->textField($model, 'username', array('class' => 'input')); ?></div>
        </div>
        
        <div class="tr">
            <div class="td"><?= $form->labelEx($model, 'password') ?></div>
            <div class="td2"><?= $form->passwordField($model, 'password', array('class' => 'input')); ?></div>
        </div>
        
        <div class="tr">
            <div class="td">&nbsp;</div>
            <div class="td2">
                <?= $form->checkBox($model, 'rememberMe'); ?>
                <?= $form->label($model, 'rememberMe'); ?>
            </div>
        </div>
        
        <div class="tr">
            <div class="td">&nbsp;</div>
            <div class="td2">
                <?= CHtml::submitButton('Đăng nhập', array('class' => 'button')); ?>
            </div>
        </div>
    <?php $this->endWidget(); ?>
    </div>
    
    <div class="error-msg">
        <span><?php
            if($model->getErrors()) {
                if($form->error($model, 'username')) {
                    echo $form->error($model, 'username');
                }
                else {
                    echo $form->error($model, 'password');
                }
            }
        ?></span>
    </div>
</div>